package com.ocom.webapi.feign;


import com.ocom.common.resp.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;


@FeignClient(value = "oauth")
public interface OauthService {

    //交换token
    @PostMapping("/login")
    public Result login(
            @RequestParam("grant_type") String grantType,
            @RequestParam("client_id") String clientId,
            @RequestParam("client_secret") String clientSecret,
            @RequestParam("token") String token,
            @RequestParam("comId") Long comId
    );

    //交换token
    @PostMapping("/login")
    public Result loginWeb(
            @RequestParam("username") String username,
            @RequestParam("password") String password,
            @RequestParam("sms_code") String smsCode,
            @RequestParam("grant_type") String grantType,
            @RequestParam("client_id") String clientId,
            @RequestParam("client_secret") String clientSecret
    );


}

